package cn.shop.utils.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @author : 李一涵
 * @date : Created in 2021-11-10 15:12
 * @description : 状态代码
 */
public enum Status {

    /** 正常 */
    NORMAL(0, "正常"),
    DISABLE(1, "禁用"),
    MERGED(2, "已合区");

    @EnumValue
    private final int code;
    @JsonValue
    private final String description;

    Status(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int code() {
        return code;
    }

    public String description() {
        return description;
    }
}
